home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-08-27 | 46.1 KB | 1,563 lines |
- #! /bin/sh
- # patch script for converting a41 to a45
- TOP=.
-
- Patch()
- {
- echo "Patch $1:"; patch -s $TOP/$1
- }
-
- NewFile()
- {
- echo "New file $1"; cat >$TOP/$1
- }
-
- NewDir()
- {
- echo "New directory $1"; mkdir $TOP/$1
- }
-
- RmFile()
- {
- echo "Remove $1"; rm -f $TOP/$1.orig; mv $TOP/$1 $TOP/$1.orig
- }
-
- Patch README<<'EOF-EOF-EOF'
- 1c1
- < $Header: /usr/people/sam/fax/RCS/README,v 1.63 93/08/15 18:45:33 sam Exp $
- ---
- > $Header: /usr/people/sam/fax/RCS/README,v 1.65 93/08/27 13:02:42 sam Exp $
- 166,170c166,168
- < The system is written almost entirely in C++. I use the AT&T 2.1
- < compiler, as supported by SGI. I have had no luck building the code
- < under the AT&T 3.0 compiler (I tried but had to fallback to the 2.1
- < compiler). GNU gcc 2.3.3 has been successfully used to build this
- < software on all systems.
- ---
- > The system is written almost entirely in C++. I use the AT&T 2.1 and
- > 3.0 compilers, as supported by SGI. GNU gcc 2.3.3 and later have been
- > successfully used to build this software on all systems.
- 239,240c237,238
- < versions may also work (and in fact may be required if you use a newer
- < version of gcc).
- ---
- > versions also work (and are usually required with newer versions of
- > gcc).
- 263,264c261,262
- < versions of awk. If you encounter problems, in particular with the rts
- < (Return To Sender) shell script, try the GNU awk.
- ---
- > versions of awk. If you encounter problems, in particular with the
- > notify or rts (Return To Sender) shell scripts, try the GNU awk.
- 300a299
- > aix32 AIX 3.2.3 extended on a RS/6000 model 580 (incomplete)
- 302a302
- > hpux HP-UX 9.x on an HP 9000/700 (not yet ready)
- 313a314,315
- > Systems that are marked (not yet ready) are in preparation, but not
- > yet organized for distribution.
- 889c891
- < folks' work. Robin Schaufler did much of the early work for delayed
- ---
- > folks' work. Robin Schaufler did the original scheme for delayed
- EOF-EOF-EOF
- Patch configure<<'EOF-EOF-EOF'
- 2c2
- < # $Header: /usr/people/sam/fax/RCS/configure,v 1.80 93/08/16 08:05:17 sam Exp $
- ---
- > # $Header: /usr/people/sam/fax/RCS/configure,v 1.82 93/08/26 19:21:01 sam Exp $
- 96a97,98
- > @rt) TARGET=reno;;
- > @AIX) TARGET=aix32;;
- 159a162,169
- > reno|reno-gcc)
- > TARGET=reno COMPILER=gcc
- > warnUnfinished $TARGET
- > ;;
- > aix32|aix32-gcc)
- > TARGET=aix32 COMPILER=gcc
- > warnUnfinished $TARGET
- > ;;
- 358c368
- < 4.4bsd*)
- ---
- > reno*|4.4bsd*)
- 436c446
- < CheckDecl mkstemp stdio.h || echo 'extern int mkstemp(char *);'
- ---
- > CheckDecl mkstemp stdio.h unistd.h || echo 'extern int mkstemp(char *);'
- 471c481
- < CheckDecl fchmod unistd.h libc.h osfcn.h ||
- ---
- > CheckDecl fchmod unistd.h libc.h osfcn.h sys/stat.h ||
- EOF-EOF-EOF
- Patch distrules<<'EOF-EOF-EOF'
- 1c1
- < # $Header: /usr/people/sam/fax/RCS/distrules,v 1.73 93/08/16 08:05:04 sam Exp $
- ---
- > # $Header: /usr/people/sam/fax/RCS/distrules,v 1.74 93/08/27 14:02:22 sam Exp $
- 134a135,162
- > PORTAIXFILES= \
- > port/aix32/Makefile \
- > port/aix32/Makefile.flexfax \
- > port/aix32/README \
- > port/aix32/defs.gcc \
- > port/aix32/install.sh \
- > port/aix32/strcasecmp.c \
- > port/aix32/vsyslog.c \
- > port/aix32/gcc-related/ctype.h \
- > port/aix32/gcc-related/dirent.h \
- > port/aix32/gcc-related/fcntl.h \
- > port/aix32/gcc-related/math.h \
- > port/aix32/gcc-related/netdb.h \
- > port/aix32/gcc-related/pwd.h \
- > port/aix32/gcc-related/setjmp.h \
- > port/aix32/gcc-related/signal.h \
- > port/aix32/gcc-related/stdio.h \
- > port/aix32/gcc-related/stdlib.h \
- > port/aix32/gcc-related/string.h \
- > port/aix32/gcc-related/termios.h \
- > port/aix32/gcc-related/time.h \
- > port/aix32/gcc-related/unistd.h \
- > port/aix32/gcc-related/sys/fcntl.h \
- > port/aix32/gcc-related/sys/select.h \
- > port/aix32/gcc-related/sys/stat.h \
- > port/aix32/gcc-related/sys/time.h \
- > port/aix32/gcc-related/sys/wait.h \
- > ${NULL}
- 149a178
- > ${PORTAIXFILES} \
- EOF-EOF-EOF
- Patch dist/flexfax.alpha<<'EOF-EOF-EOF'
- 1c1
- < define ALPHA 041
- ---
- > define ALPHA 045
- EOF-EOF-EOF
- Patch etc/config.rc32acl<<'EOF-EOF-EOF'
- 1c1
- < # $Header: /usr/people/sam/fax/etc/RCS/config.rc32acl,v 1.1 93/07/29 16:36:15 sam Exp $
- ---
- > # $Header: /usr/people/sam/fax/etc/RCS/config.rc32acl,v 1.2 93/08/24 10:16:45 sam Exp $
- 8,13c8,13
- < # This configuration file sets up the modem to run at 19.2 for
- < # sending and for receiving. XON/XOFF flow control is used on
- < # the tty port. RTS/CTS can be used by switching the flow control
- < # setup, but beware of modems that do not support it during
- < # facsimile operations. Also beware that the adaptive-answer
- < # facility, when supported, is usually unreliable.
- ---
- > # This configuration file sets up the modem to run at 38.4 for
- > # sending and for receiving. RTS/CTS is used for flow control
- > # which also works for data connections. Adaptive answer support
- > # is reliable, but to use it you must also enable ModemWaitForConnect
- > # to force the server to skip intermediate status messages and
- > # wait for the "CONNECT" message.
- 30a31
- > ModemWaitForConnect: yes # wait for CONNECT on answer
- EOF-EOF-EOF
- Patch etc/faxaddmodem.sh<<'EOF-EOF-EOF'
- 2c2
- < # $Header: /usr/people/sam/fax/etc/RCS/faxaddmodem.sh,v 1.62 93/08/12 08:44:44 sam Exp $
- ---
- > # $Header: /usr/people/sam/fax/etc/RCS/faxaddmodem.sh,v 1.64 93/08/27 09:00:30 sam Exp $
- 423c423
- < hasYP=`ypcat services 2>/dev/null | tail -1'` 2>/dev/null
- ---
- > hasYP=`ypcat services 2>/dev/null | tail -1` 2>/dev/null
- 886c886,888
- < if stty -f >/dev/null 2>&1; then
- ---
- > # NB: AIX returns zero even though -f is not valid.
- > #
- > if [ $OS != "AIX" ] && stty -f >/dev/null 2>&1; then
- 915c917,918
- < pat=`echo "$i"|sed -e 's/[*&$\\]/\\\\&/g'` # escape regex metacharacters
- ---
- > # NB: [*&\\$] must have the "$" last for AIX (yech)
- > pat=`echo "$i"|sed -e 's/[*&\\$]/\\\\&/g'` # escape regex metacharacters
- EOF-EOF-EOF
- Patch etc/faxd<<'EOF-EOF-EOF'
- 2c2
- < # $Header: /usr/people/sam/fax/etc/RCS/faxd,v 1.9 93/04/19 07:52:33 sam Exp $
- ---
- > # $Header: /usr/people/sam/fax/etc/RCS/faxd,v 1.11 93/08/22 14:43:26 sam Exp $
- EOF-EOF-EOF
- Patch etc/probemodem.sh<<'EOF-EOF-EOF'
- 2c2
- < # $Header: /usr/people/sam/fax/etc/RCS/probemodem.sh,v 1.4 93/08/09 09:14:16 sam Exp $
- ---
- > # $Header: /usr/people/sam/fax/etc/RCS/probemodem.sh,v 1.5 93/08/27 09:00:33 sam Exp $
- 231c231,233
- < if stty -f >/dev/null 2>&1; then
- ---
- > # NB: AIX returns zero even though -f is not valid.
- > #
- > if [ $OS != "AIX" ] && stty -f >/dev/null 2>&1; then
- 260c262,263
- < pat=`echo "$i"|sed -e 's/[*&$\\]/\\\\&/g'` # escape regex metacharacters
- ---
- > # NB: [*&\\$] must have the "$" last for AIX (yech)
- > pat=`echo "$i"|sed -e 's/[*&\\$]/\\\\&/g'` # escape regex metacharacters
- EOF-EOF-EOF
- Patch faxcover/faxcover.ps<<'EOF-EOF-EOF'
- 7c7
- < % $Header: /usr/people/sam/fax/faxcover/RCS/faxcover.ps,v 1.9 93/04/18 18:05:13 sam Exp $
- ---
- > % $Header: /usr/people/sam/fax/faxcover/RCS/faxcover.ps,v 1.10 93/08/27 14:06:17 sam Exp $
- 303c303
- < y comments rule stringwidth pop { x y M S /y y 29 sub def } BreakIntoLines
- ---
- > comments rule stringwidth pop { x y M S /y y 29 sub def } BreakIntoLines
- EOF-EOF-EOF
- Patch faxd/Class2Send.c++<<'EOF-EOF-EOF'
- 1c1
- < /* $Header: /usr/people/sam/fax/faxd/RCS/Class2Send.c++,v 1.58 93/08/16 08:21:04 sam Exp $
- ---
- > /* $Header: /usr/people/sam/fax/faxd/RCS/Class2Send.c++,v 1.59 93/08/27 09:00:52 sam Exp $
- 42a43
- > again:
- 57,58c58,67
- < if (strneq(rbuf, "CED", 3)) // hack for busted modems
- < return (dialResponse());
- ---
- > /*
- > * RC32ACL-based modems return CED before +FCON;
- > * so this is ignored. We also skip some common
- > * extended status messages that folks forget to
- > * disable in the config file.
- > */
- > if (strneq(rbuf, "CED", 3))
- > goto again;
- > if (strneq(rbuf, "DIALING", 7) || strneq(rbuf, "RRING", 5))
- > goto again;
- EOF-EOF-EOF
- Patch faxd/FaxPoll.c++<<'EOF-EOF-EOF'
- 1c1
- < /* $Header: /usr/people/sam/fax/faxd/RCS/FaxPoll.c++,v 1.9 93/03/26 10:15:01 sam Exp $
- ---
- > /* $Header: /usr/people/sam/fax/faxd/RCS/FaxPoll.c++,v 1.10 93/08/27 12:40:22 sam Exp $
- 39a40
- > changeState(RECEIVING);
- 40a42
- > okToRecv = TRUE; // we request receive, so it's ok
- EOF-EOF-EOF
- Patch faxd/FaxRecv.c++<<'EOF-EOF-EOF'
- 1c1
- < /* $Header: /usr/people/sam/fax/faxd/RCS/FaxRecv.c++,v 1.53 93/06/22 18:21:46 sam Exp $
- ---
- > /* $Header: /usr/people/sam/fax/faxd/RCS/FaxRecv.c++,v 1.56 93/08/27 14:00:14 sam Exp $
- 24a25
- > #include <unistd.h>
- 49c50
- < changeState(RECEIVING, 0);
- ---
- > changeState(RECEIVING);
- EOF-EOF-EOF
- Patch faxd/FaxSend.c++<<'EOF-EOF-EOF'
- 1c1
- < /* $Header: /usr/people/sam/fax/faxd/RCS/FaxSend.c++,v 1.83 93/07/20 16:28:01 sam Exp $
- ---
- > /* $Header: /usr/people/sam/fax/faxd/RCS/FaxSend.c++,v 1.84 93/08/27 12:40:56 sam Exp $
- 286,289c286,289
- < const char* cig = fax.files[i];
- < if (*cig == '\0')
- < cig = FAXNumber;
- < traceStatus(FAXTRACE_PROTOCOL, "POLL with CIG \"%s\"", cig);
- ---
- > fxStr cig = canonicalizePhoneNumber(fax.files[i]);
- > if (cig == "")
- > cig = canonicalizePhoneNumber(FAXNumber);
- > traceStatus(FAXTRACE_PROTOCOL, "POLL with CIG \"%s\"", (char*) cig);
- EOF-EOF-EOF
- Patch faxd/FaxServer.c++<<'EOF-EOF-EOF'
- 1c1
- < /* $Header: /usr/people/sam/fax/faxd/RCS/FaxServer.c++,v 1.121 93/08/15 11:23:23 sam Exp $
- ---
- > /* $Header: /usr/people/sam/fax/faxd/RCS/FaxServer.c++,v 1.122 93/08/27 12:25:39 sam Exp $
- 531a532
- > #ifndef AIXV3 /* AIX is busted */
- 538a540
- > #endif
- EOF-EOF-EOF
- Patch faxd/faxServerApp.c++<<'EOF-EOF-EOF'
- 1c1
- < /* $Header: /usr/people/sam/fax/faxd/RCS/faxServerApp.c++,v 1.120 93/08/16 08:19:57 sam Exp $
- ---
- > /* $Header: /usr/people/sam/fax/faxd/RCS/faxServerApp.c++,v 1.121 93/08/27 16:41:01 sam Exp $
- 913a914,915
- > // NB: use a temporary here to avoid gcc bug
- > fxStr canon(server->canonicalizePhoneNumber(req.number));
- 919c921
- < | quote | server->canonicalizePhoneNumber(req.number) | enquote
- ---
- > | quote | canon | enquote
- EOF-EOF-EOF
- Patch man/faxcover.1<<'EOF-EOF-EOF'
- 1c1
- < .\" $Header: /usr/people/sam/fax/man/RCS/faxcover.1,v 1.12 93/06/25 14:17:30 sam Exp $
- ---
- > .\" $Header: /usr/people/sam/fax/man/RCS/faxcover.1,v 1.13 93/08/27 08:55:44 sam Exp $
- 163a164
- > .IR flexfax (1),
- EOF-EOF-EOF
- Patch port/386bsd/defs<<'EOF-EOF-EOF'
- 1c1
- < # $Header: /usr/people/sam/fax/port/386bsd/RCS/defs,v 1.20 93/08/13 15:15:53 sam Exp $
- ---
- > # $Header: /usr/people/sam/fax/port/386bsd/RCS/defs,v 1.21 93/08/17 11:29:24 sam Exp $
- 119c119
- < MACHDEPLIBS=-lg++ -liberty
- ---
- > MACHDEPLIBS=-lg++
- EOF-EOF-EOF
- Patch port/4.4bsd/defs<<'EOF-EOF-EOF'
- 1c1
- < # $Header: /usr/people/sam/fax/port/4.4bsd/RCS/defs,v 1.5 93/08/13 15:16:07 sam Exp $
- ---
- > # $Header: /usr/people/sam/fax/port/4.4bsd/RCS/defs,v 1.6 93/08/17 11:29:33 sam Exp $
- 117c117
- < MACHDEPLIBS=-lg++ -liberty
- ---
- > MACHDEPLIBS=-lg++
- EOF-EOF-EOF
- NewDir port/aix32
- NewFile port/aix32/Makefile<<'EOF-EOF-EOF'
- #! smake
- # $Header: /usr/people/sam/fax/port/aix32/RCS/Makefile,v 1.1 93/08/26 19:28:37 sam Exp $
- #
- # FlexFAX Facsimile Software
- #
- # Copyright (c) 1993 Sam Leffler
- # Copyright (c) 1993 Silicon Graphics, Inc.
- #
- # Permission to use, copy, modify, distribute, and sell this software and
- # its documentation for any purpose is hereby granted without fee, provided
- # that (i) the above copyright notices and this permission notice appear in
- # all copies of the software and related documentation, and (ii) the names of
- # Sam Leffler and Silicon Graphics may not be used in any advertising or
- # publicity relating to the software without the specific, prior written
- # permission of Sam Leffler and Silicon Graphics.
- #
- # THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
- # EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- # WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- #
- # IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- # ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- # OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- # WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- # LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- # OF THIS SOFTWARE.
- #
- DEPTH=../..
- include ${DEPTH}/defs
-
- CFILES=\
- strcasecmp.c \
- vsyslog.c \
- ${NULL}
- TARGETS=${PORT}/libport.a
-
- default all::
- @${MAKE} targets
-
- targets: $(TARGETS)
-
- include ${COMMONRULES}
-
- libport.a: ${OBJECTS}
- @rm -f $@;
- @echo "${AR} ${AROPTS} $@ ${OBJECTS}";\
- ${AR} ${AROPTS} $@ ${OBJECTS} $(C++FILT)
- ${RANLIB} $@
- ${PORT}/libport.a: libport.a
-
- install:
- EOF-EOF-EOF
- NewFile port/aix32/Makefile.flexfax<<'EOF-EOF-EOF'
- #!smake
- # $Header: /usr/people/sam/fax/port/aix32/RCS/Makefile.flexfax,v 1.1 93/08/26 19:28:39 sam Exp $
- #
- # FlexFAX Facsimile Software
- #
- # Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993 Sam Leffler
- # Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- #
- # Permission to use, copy, modify, distribute, and sell this software and
- # its documentation for any purpose is hereby granted without fee, provided
- # that (i) the above copyright notices and this permission notice appear in
- # all copies of the software and related documentation, and (ii) the names of
- # Sam Leffler and Silicon Graphics may not be used in any advertising or
- # publicity relating to the software without the specific, prior written
- # permission of Sam Leffler and Silicon Graphics.
- #
- # THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
- # EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- # WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- #
- # IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- # ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- # OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- # WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- # LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- # OF THIS SOFTWARE.
- #
- COMMONPREF=fax
- DEPTH= .
-
- include defs
-
- DIRS= \
- ${PORT} \
- iv \
- util \
- fax2ps \
- faxalter \
- faxcover \
- faxd \
- faxmail \
- faxrm \
- faxstat \
- recvfax \
- sendfax \
- \
- doc \
- etc \
- man \
- ${NULL}
- OTHERDIRS=\
- libtiff \
- ${NULL}
-
- .PATH: ${DIRS} ${OTHERDIRS}
-
- TARGETS=flexfax
-
- default all ${TARGETS}:
- @${MAKE} -f ${MAKEFILE} dirs
-
- include rules
-
- dirs::
- @for i in ${OTHERDIRS} ${DIRS}; do \
- (${ECHO} "= "$$i; cd $$i; ${MAKE}); \
- done
- depend::
- @for i in ${DIRS}; do \
- (${ECHO} "= "$$i; cd $$i; ${MAKE} depend); \
- done
- clean::
- @for i in ${OTHERDIRS} ${DIRS}; do \
- (${ECHO} "= "$$i; cd $$i; ${MAKE} clean); \
- done
- clobber::
- @for i in ${OTHERDIRS} ${DIRS}; do \
- (${ECHO} "= "$$i; cd $$i; ${MAKE} clobber); \
- done
-
- makeClientDirs::
- ${INSTALL} -u bin -g sys -m 755 -idb flexfax.sw.client -dir \
- ${BIN} ${LIBDATA} ${LIBEXEC}
- makeServerDirs::
- ${INSTALL} -u bin -g sys -m 755 -idb flexfax.sw.server -dir ${USRETC}
- ${INSTALL} -u ${FAXUSER} -g ${FAXGROUP} -m 755 \
- -idb flexfax.sw.server -dir \
- -F ${SPOOL} bin etc recvq sendq tmp info cinfo log status
- ${INSTALL} -u ${FAXUSER} -g ${FAXGROUP} -m 700 \
- -idb flexfax.sw.server -dir \
- -F ${SPOOL} docq
- makeDirs: makeClientDirs makeServerDirs
-
- makeDevices::
- ${INSTALL} -u ${FAXUSER} -g ${FAXGROUP} -m 600 -fifo \
- -idb flexfax.sw.server -F ${SPOOL} FIFO
-
- install: makeDirs makeDevices
- @for i in ${DIRS}; do \
- (${ECHO} "= "$$i; cd $$i; ${MAKE} install); \
- done
-
- include distrules
- EOF-EOF-EOF
- NewFile port/aix32/README<<'EOF-EOF-EOF'
- This directory contains the files needed to port the FlexFax fax server to
- the IBM RISC System/6000. The environment under which this port was made
- was:
-
- RISC System/6000 model 580
- AIX 3.2.3 extended
- gcc v2.4.5 with g++ libraries v2.3.1
-
- This porting has not been tested completely so there may be bugs or
- ommisions on my part. One particular bug which I have been unable
- to solve yet has to do with select() not blocking on a read of the FIFOs
- used by FlexFax. This causes faxd to loop in the Dispatcher::waitFor()
- routine (in iv/Dispatch/dispatcher.c++) which, in turn, causes faxd to
- consume alot of CPU time. Also, it manifests itself as a bug in
- FaxServer::abortRequested() routine (in faxd/FaxServer.c++). If anyone
- knows a fix for this problem, please let me know.
-
- There are several directories under this port directory. The
- gcc-related directory contains wrappers for system headers for use by gcc
- during comilation of C++ code.
-
- Robert MacKinnon, UNIX Support | Internet/Email: robmack@bsc.no
- Bergen Environmental Sciences and | robmack at bergen
- Solution Centre, Bergen, NORWAY | Phone: +47-5-544618
- EOF-EOF-EOF
- NewFile port/aix32/defs.gcc<<'EOF-EOF-EOF'
- # $Header: /usr/people/sam/fax/port/aix32/RCS/defs.gcc,v 1.1 93/08/26 19:28:40 sam Exp $
- #
- # FlexFAX Facsimile Software
- #
- # Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993 Sam Leffler
- # Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
- #
- # Permission to use, copy, modify, distribute, and sell this software and
- # its documentation for any purpose is hereby granted without fee, provided
- # that (i) the above copyright notices and this permission notice appear in
- # all copies of the software and related documentation, and (ii) the names of
- # Sam Leffler and Silicon Graphics may not be used in any advertising or
- # publicity relating to the software without the specific, prior written
- # permission of Sam Leffler and Silicon Graphics.
- #
- # THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
- # EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- # WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- #
- # IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- # ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- # OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- # WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- # LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- # OF THIS SOFTWARE.
- #
-
- #
- # These definitions are for building the software on a
- # IBM RISC System/6000 under AIX v3.2.3 using gcc 2.4.5 and libg++2.3.1.
- #
- # TARGET: aix32
- # COMPILER: gcc
- #
- SHELL = /bin/sh
- DESTDIR = .
- NULL =
- MAKEFILE= Makefile
-
- #
- # Location of auxiliary stuff needed for Solaris2
- #
- PORT = ${DEPTH}/port/aix32
- GENERIC = ${DEPTH}/port/generic
- #
- # Basic tools used in the build process.
- #
- C++ = /usr/local/bin/gcc
- CC = /usr/local/bin/gcc
-
- # Need $LN for c++ Make dependancy rule. Required for debugger.
- LN = /bin/ln -s
- NAWK = /usr/bin/nawk
- INSTALL = ksh ${PORT}/install.sh
- MKDEPEND= ksh ${GENERIC}/mkdepend
- AR = /usr/bin/ar
- RANLIB = /bin/echo
- SED = /usr/bin/sed
-
- #
- # AR options for creating/updating an archive
- #
- AROPTS= crs
-
- #
- # Special options for lptops compilation (yech).
- #
-
- #
- # We wants System V-style getty support.
- #
- SYSGETTY=GettySysV.c++
-
- #
- # and we want System V-style UUCP lock support.
- #
- UUCP_LOCKDIR=/etc/locks
- UUCP_LOCKTYPE=0
- UUCP_LOCKMODE=0444
-
- #
- # Location of Adobe Font Metrics for lptops.
- #
- AFMDIR=/usr/local/lib/afm
-
- #
- # PostScript imager for server to use: either dps
- # for Display Postscriptor gs for Ghostscript.
- #
- PSIMAGER=gs
-
- #
- # Mail program for sending notification messages.
- #
- FAX_MAILCMD=/usr/bin/mail
- SENDMAIL=/usr/sbin/sendmail
-
- #
- # Default optimizer and prototype options
- #
- OPTIMIZER=-g
- PROTOTYPES=
- CVERSION= -D__ANSI_CPP__
- C++FILE= -x c++
-
- #
- # Auxillary directories for munged system header files
- #
- AUXINCL= ${PORT}/gcc-related
-
- # default definitions for programs--overide them as desired
- LIBS= ${LIBUTIL} ${LIBTIFF} ${LIBIV}
- LLDLIBS=${LIBS} ${MACHDEPLIBS}
- #
- # Override this definition to eliminate shared library use.
- #
- SHDLIBC=-static
-
- #
- # Libraries that may vary from machine to machine (especially if
- # you use GNU GCC instead of AT&T C++).
- #
- MACHDEPLIBS=${PORT}/libport.a -lg++ -liberty -lc -lbsd -lm
- #
- # You must have v3.0 or newer of the TIFF library. If
- # you already have it installed, or if you have version 3.0
- # or newer of InterViews installed (which includes the TIFF
- # library), you can point these to those places. Otherwise,
- # you can just use the code provided here.
- #
- TIFF= ${DEPTH}/libtiff
- LIBTIFF=${TIFF}/libtiff.a
- #
- # If you already have InterViews 3.0 or newer installed,
- # define these to be something like:
- #
- #IV= /usr/include
- #LIBIV= /usr/lib/libIV.a
- #
- # Otherwise you can just use the subset of classes used by
- # the fax software and collected here in a hacked-up library.
- #
- IV= ${DEPTH}/iv
- LIBIV= ${IV}/libivhack.a
- # random utility functions and classes
- UTIL= ${DEPTH}/util
- LIBUTIL=${UTIL}/libfaxutil.a
-
- #
- # Uid&Gid for installing server stuff. Note that the server process
- # proper (/usr/etc/faxd or similar) must either run setuid root or
- # setuid uucp (i.e. fax and uucp must have the same uid). This is
- # so that the fax server can participate in the UUCP locking scheme
- # and thereby implement tty line sharing (i.e. share the same line
- # and modem for both fax and data).
- #
- FAXUSER=uucp
- FAXGROUP=uucp
-
- #
- # Directories where stuff gets placed:
- #
- # BIN client-directed applications
- # LIBDATA client-directed application library data files
- # LIBEXEC client-directed application library executables
- # SPOOL spooling area for servers
- # DOC non-manual documentation
- # USRETC place for servers (faxd & faxd.recv)
- #
- BIN= /usr/local/bin
- LIBDATA=/usr/local/lib/fax
- LIBEXEC=/usr/local/lib/fax
- DOC= /usr/local/lib/fax/doc
- USRETC= /usr/local/etc
-
- SPOOL= /var/spool/fax
- #
- # Manual-related controls:
- #
- # MAN head of manual tree
- # MANAPP subdirectory for stuff in BIN
- # MANSYS subdirectory for server & server-related apps
- # MANFILES subdirectory for file format info
- # PAGEDIRT temp files to remove on clean/clobber
- #
- MAN = /usr/man
-
- MANAPPS = man1
- MANSYS = man1
- MANFILES= man4
-
- NROFF = /usr/bin/nroff
- COMPRESS= compress
-
- MANCAPP = ${CLIENTAPPS}
- MANCFILE= ${CLIENTFILES}
- MANSAPP = ${SERVERAPPS}
- MANSFILE= ${SERVERFILES}
- PAGEDIRT=
-
- # programs used during installation
- ECHO= /bin/echo
- FTR= /usr/sbin/ftr
- GREP= /usr/bin/grep
- RM= /bin/rm
- PWD= /bin/pwd
-
- #
- # Definitions used by common rules.
- #
- COMMONRULES=${DEPTH}/rules
- COMMONTARGS= clobber clean rmtargets depend incdepend
-
- #
- # C compiler flags are composed of variable (set on the command line),
- # local (defined in the makefile), and global (defined in this file)
- # parts, in that order. This ordering is used so that variable or
- # locally specified include directories are searched before the globally
- # specified ones.
- #
- CFLAGS= ${CVERSION} ${VCFLAGS} ${LCFLAGS} ${GCFLAGS}
-
- VCFLAGS=${VCDEFS} ${VCINCS} ${VCOPTS}
- LCFLAGS=${LCDEFS} ${LCINCS} ${LCOPTS}
- GCFLAGS=${GCDEFS} ${GCINCS} ${GCOPTS}
-
- COPTS= ${VCOPTS} ${LCOPTS} ${GCOPTS}
- CDEFS= ${VCDEFS} ${LCDEFS} ${GCDEFS}
- CINCS= ${VCINCS} ${LCINCS} ${GCINCS}
-
- GCOPTS=${OPTIMIZER}
- GCDEFS= -DAIXV3 -DAIX
- GCINCS= -I. -I${DEPTH} -I${GENERIC} -I${UTIL} -I${TIFF}
- #
- # C++ flags are decomposed using the same hierarchy as C flags.
- #
- C++FLAGS=${CVERSION} ${VC++FLAGS} ${LC++FLAGS} ${GC++FLAGS}
-
- VC++FLAGS=${VC++DEFS} ${VC++INCS} ${VC++OPTS}
- LC++FLAGS=${LC++DEFS} ${LC++INCS} ${LC++OPTS}
- GC++FLAGS=${GC++DEFS} ${GC++INCS} ${GC++OPTS}
-
- C++OPTS=${VC++OPTS} ${LC++OPTS} ${GC++OPTS}
- C++DEFS=${VC++DEFS} ${LC++DEFS} ${GC++DEFS}
- C++INCS=${VC++INCS} ${LC++INCS} ${GC++INCS}
-
- GC++OPTS=${OPTIMIZER}
- GC++INCS=-I. -I${DEPTH} -I${GENERIC} -I${AUXINCL} -I${UTIL} -I${IV} -I${TIFF}
- GC++DEFS= -DAIXV3 -DAIX -D_PATH_GETTY=\"/usr/sbin/getty\" -DfxSIGHANDLER=int '-DfxSIGVECHANDLER=(void(*)())'
-
- #
- # Loader flags, composed of library (-l's) and option parts, with
- # the libraries appearing last. Both of these are divided into variable,
- # local, and global parts. The composition of LDFLAGS is done in the
- # other "direction" from CFLAGS so that all the -L's, that are part of
- # LDOPTS, appear before any of the -l's, which are part of LDLIBS.
- # Another benefit of segregating the libraries from the remaining of the
- # loader options is that the libraries alone can easily be given to
- # another program, e.g., lint.
- #
- # Notes:
- # - If a program should not be linked with the shared version of libc,
- # then its make file should override the setting of SHDLIBC with a
- # line such as "SHDLIBC=".
- #
- LDFLAGS=${LDOPTS} ${LDLIBS}
-
- LDOPTS=${VLDOPTS} ${LLDOPTS} ${GLDOPTS}
- LDLIBS=${VLDLIBS} ${LLDLIBS} ${GLDLIBS}
-
- GLDOPTS=
- GLDLIBS=${SHDLIBC}
-
- #
- # Convenient command macros that include the flags macros.
- #
- C++F= ${C++} ${C++FLAGS}
- C++CPP= ${C++} -E ${C++FLAGS}
- CCF= ${CC} ${CFLAGS}
-
- #
- # Shell script for generating make dependencies. MKDEPEND is a shorthand
- # for the tool's absolute pathname. MKDEPENDC adds MKDEPCFLAGS and the -c
- # mkdepend option to this. The other language's mkdepend variables try to
- # include their language's name in the variable names. Unfortunately, a
- # lot of makefiles already use the nondescript LMKDEPFLAGS for C language
- # mkdepend options, so we initialize LMKDEPCFLAGS with ${LMKDEPFLAGS}.
- #
- MKDEPENDC++ =${MKDEPEND} ${MKDEPC++FLAGS} -c "${C++F} ${C++FILE} -M"
- MKDEPENDC =${MKDEPEND} ${MKDEPCFLAGS} -c "${CCF} -M"
-
- MKDEPC++FLAGS =${VMKDEPC++FLAGS} ${LMKDEPC++FLAGS} ${GMKDEPC++FLAGS}
- MKDEPCFLAGS =${VMKDEPCFLAGS} ${LMKDEPCFLAGS} ${GMKDEPCFLAGS}
- LMKDEPCFLAGS =${LMKDEPFLAGS}
-
- GMKDEPFLAGS =-e 's@ ${INCLDIR}/@ $${INCLDIR}/@' -e 's@ ${ROOT}/@ $${ROOT}/@'
- GMKDEPC++FLAGS =${GMKDEPFLAGS} -s C++ -e 's@\.c++\.o *: @\.o: @'
- GMKDEPCFLAGS =${GMKDEPFLAGS}
-
- #
- # Macro to add to LMKDEPCFLAGS or LMKDEPC++FLAGS if your makefile builds
- # single-source programs using null suffix rules (e.g., .c:}. This option
- # works for both C and C++ make depend.
- #
- NULLSUFFIX_MKDEPFLAG=-e 's@\.o+*:@:@'
- #
- # MKDEPFILE is the name of the dependency database, included by rules.
- #
- MKDEPFILE=Makedepend
- #
- # CDEPFILES lists all C or cc-compiled source files that depend on header
- # files computable by ${MKDEPENDC}. C++DEPFILES lists all C++ files having
- # dependencies computable by ${MKDEPENDC++}.
- #
- C++DEPFILES=${C++FILES}
- CDEPFILES=${CFILES}
- DEPFILES=${C++DEPFILES} ${CDEPFILES}
-
- #
- # Directory shorthands, mainly for make depend (see GMKDEPFLAGS above).
- #
- EOF-EOF-EOF
- NewFile port/aix32/install.sh<<'EOF-EOF-EOF'
- #!/bin/ksh
- # $Header: /usr/people/sam/fax/port/aix32/RCS/install.sh,v 1.1 93/08/26 19:28:41 sam Exp $
- #
- # FlexFAX Facsimile Software
- #
- # Copyright (c) 1990, 1991, 1992 Sam Leffler
- # Copyright (c) 1991, 1992 Silicon Graphics, Inc.
- #
- # Permission to use, copy, modify, distribute, and sell this software and
- # its documentation for any purpose is hereby granted without fee, provided
- # that (i) the above copyright notices and this permission notice appear in
- # all copies of the software and related documentation, and (ii) the names of
- # Sam Leffler and Silicon Graphics may not be used in any advertising or
- # publicity relating to the software without the specific, prior written
- # permission of Stanford and Silicon Graphics.
- #
- # THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
- # EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- # WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
- #
- # IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- # ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- # OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- # WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
- # LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
- # OF THIS SOFTWARE.
- #
-
- #
- # Shell script to emulate SGI install program under SunOS.
- #
- preopts=""
- postopts=""
- SaveFirst="no";
- HasSource="yes"
- RemoveFirst=no
-
- INSTALL="/usr/ucb/install -c"
- CMD=$INSTALL
- SRC=""
- FILES=""
- DESTDIR=""
- CHMOD=":"
- CHOWN=":"
- CHGRP=":"
- RM="/bin/rm -f"
- MV="/bin/mv -f"
- ECHO=":"
-
- while [ x"$1" != x"" ]
- do
- arg=$1
- case $arg in
- -m) shift; CHMOD="/bin/chmod $1";;
- -u) shift; CHOWN="/usr/bin/chown $1";;
- -g) shift; CHGRP="/usr/bin/chgrp $1";;
- -o) SaveFirst="yes";;
- -O) RemoveFirst="yes"; SaveFirst="yes";;
- -root) shift; ROOT=$1;;
- -dir) CMD="/bin/mkdir"; HasSource="no";;
- -fifo) CMD="/usr/bin/mkfifo"; HasSource="no";;
- -ln) shift; CMD="/bin/ln"; SRC=$1;;
- -lns) shift; CMD="/bin/ln"; preopts="-s"; SRC=$1;;
- -src) shift; SRC=$1;;
- -[fF]) shift; DESTDIR=$1;;
- # these are skipped/not handled
- -idb|-new|-rawidb|-blk|-chr) shift;;
- -v) ECHO="/bin/echo";;
- -*) ;;
- *) FILES="$FILES $arg";;
- esac
- shift
- done
- : set -x
- if [ $RemoveFirst = "yes" ]; then
- for f in $FILES
- do
- bf=`basename $f`
- if [ -f $ROOT/$DESTDIR/$bf ]; then
- $ECHO "$RM $ROOT/$DESTDIR/$bf"
- $RM $ROOT/$DESTDIR/$bf
- fi
- done
- fi
- if [ $SaveFirst = "yes" ]; then
- for f in $FILES
- do
- bf=`basename $f`
- if [ -f $ROOT/$DESTDIR/$bf ]; then
- $ECHO "$MV $ROOT/$DESTDIR/$bf $ROOT/$DESTDIR/OLD$bf"
- $MV $ROOT/$DESTDIR/$bf $ROOT/$DESTDIR/OLD$bf
- fi
- done
- fi
- for f in $FILES
- do
- $ECHO "$RM $ROOT/$DESTDIR/$f"
- $RM $ROOT/$DESTDIR/$f
- if [ "$SRC" = "" -a $HasSource = "yes" ]; then
- $ECHO "$CMD $preopts $f $ROOT/$DESTDIR/$f $postopts"
- $CMD $preopts $f $ROOT/$DESTDIR/$f $postopts
- else
- $ECHO "$CMD $preopts $SRC $ROOT/$DESTDIR/$f $postopts"
- $CMD $preopts $SRC $ROOT/$DESTDIR/$f $postopts
- fi
- $ECHO "$CHOWN $ROOT/$DESTDIR/$f"; $CHOWN $ROOT/$DESTDIR/$f
- $ECHO "$CHGRP $ROOT/$DESTDIR/$f"; $CHGRP $ROOT/$DESTDIR/$f
- $ECHO "$CHMOD $ROOT/$DESTDIR/$f"; $CHMOD $ROOT/$DESTDIR/$f
- done
- EOF-EOF-EOF
- NewFile port/aix32/strcasecmp.c<<'EOF-EOF-EOF'
- /*
- * Copyright (c) 1987 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that: (1) source distributions retain this entire copyright
- * notice and comment, and (2) distributions including binaries display
- * the following acknowledgement: ``This product includes software
- * developed by the University of California, Berkeley and its contributors''
- * in the documentation or other materials provided with the distribution
- * and in all advertising materials mentioning features or use of this
- * software. Neither the name of the University nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
- #include <string.h>
-
- #if defined(LIBC_SCCS) && !defined(lint)
- static const char sccsid[] = "@(#)strcasecmp.c 5.9 (Berkeley) 6/1/90";
- #endif /* LIBC_SCCS and not lint */
-
- /*
- * This array is designed for mapping upper and lower case letter
- * together for a case independent comparison. The mappings are
- * based upon ascii character sequences.
- */
- static const u_char charmap[] = {
- '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
- '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
- '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
- '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
- '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
- '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
- '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
- '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
- '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
- '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
- '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
- '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137',
- '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
- '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
- '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
- '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
- '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
- '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
- '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
- '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
- '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247',
- '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257',
- '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267',
- '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277',
- '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307',
- '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317',
- '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327',
- '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337',
- '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
- '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
- '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
- '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377',
- };
-
- int
- strcasecmp(s1, s2)
- const char *s1, *s2;
- {
- register const u_char *cm = charmap,
- *us1 = (const u_char *)s1,
- *us2 = (const u_char *)s2;
-
- while (cm[*us1] == cm[*us2++])
- if (*us1++ == '\0')
- return (0);
- return (cm[*us1] - cm[*--us2]);
- }
-
- int
- strncasecmp(s1, s2, n)
- const char *s1, *s2;
- register size_t n;
- {
- if (n != 0) {
- register const u_char *cm = charmap,
- *us1 = (const u_char *)s1,
- *us2 = (const u_char *)s2;
-
- do {
- if (cm[*us1] != cm[*us2++])
- return (cm[*us1] - cm[*--us2]);
- if (*us1++ == '\0')
- break;
- } while (--n != 0);
- }
- return (0);
- }
- EOF-EOF-EOF
- NewFile port/aix32/vsyslog.c<<'EOF-EOF-EOF'
- #include <stdio.h>
- #include <sys/types.h>
- #include <stdarg.h>
- #include <sys/syslog.h>
-
- void
- vsyslog(pri, fmt, ap)
- int pri;
- register const char *fmt;
- va_list ap;
- {
- char tbuf[2048];
-
- (void)vsprintf(tbuf, fmt, ap);
- (void)syslog(pri, tbuf);
- return;
- }
- EOF-EOF-EOF
- NewDir port/aix32/gcc-related
- NewFile port/aix32/gcc-related/ctype.h<<'EOF-EOF-EOF'
- extern "C" {
- #include_next <ctype.h>
- }
- EOF-EOF-EOF
- NewFile port/aix32/gcc-related/dirent.h<<'EOF-EOF-EOF'
- extern "C" {
- #include_next <dirent.h>
- }
- EOF-EOF-EOF
- NewFile port/aix32/gcc-related/fcntl.h<<'EOF-EOF-EOF'
- extern "C" {
- #define open Fx_open
- #include_next <fcntl.h>
- #undef open
- int open(const char *, int, mode_t = 0666);
- }
- EOF-EOF-EOF
- NewFile port/aix32/gcc-related/math.h<<'EOF-EOF-EOF'
- /* (empty file) */
- EOF-EOF-EOF
- NewFile port/aix32/gcc-related/netdb.h<<'EOF-EOF-EOF'
- extern "C" {
- #include_next <netdb.h>
- struct hostent * gethostbyname (const char *);
- struct servent * getservbyname (const char*, const char*);
- }
- EOF-EOF-EOF
- NewFile port/aix32/gcc-related/pwd.h<<'EOF-EOF-EOF'
- extern "C" {
- #include_next <pwd.h>
- }
- EOF-EOF-EOF
- NewFile port/aix32/gcc-related/setjmp.h<<'EOF-EOF-EOF'
- extern "C" {
- #include_next <setjmp.h>
- }
- EOF-EOF-EOF
- NewFile port/aix32/gcc-related/signal.h<<'EOF-EOF-EOF'
- extern "C" {
- #include <sys/types.h>
- #include_next <sys/signal.h>
- int sigpause (int);
- int sigsetmask (int);
- int sigblock (int);
- void (*sigset(int, void (*) (int)))(int);
- int sighold(int);
- int sigrelse(int);
- int sigignore(int);
- #undef SV_INTERRUPT
- }
- EOF-EOF-EOF
- NewFile port/aix32/gcc-related/stdio.h<<'EOF-EOF-EOF'
- extern "C" {
- #define popen Fx_popen
- #define vfprintf Fx_vfprintf
- #define vprintf Fx_vprintf
- #define vsprintf Fx_vsprintf
-
- #ifdef _VA_LIST
- #define __va_list va_list
- #else
- typedef char * __va_list;
- #endif
-
- #include_next <stdio.h>
-
- #undef popen
- #undef vfprintf
- #undef vprintf
- #undef vsprintf
-
- extern FILE* popen(const char*, const char*);
- extern int _filbuf(FILE*);
- extern int _flsbuf(unsigned char, FILE*);
- extern int vfprintf(FILE *, const char *, __va_list);
- extern int vprintf(const char *, __va_list);
- extern int vsprintf(char *, const char *, __va_list);
- }
- EOF-EOF-EOF
- NewFile port/aix32/gcc-related/stdlib.h<<'EOF-EOF-EOF'
- extern "C" {
- #define getopt Fx_getopt
- #include_next <stdlib.h>
- #undef getopt
- }
- EOF-EOF-EOF
- NewFile port/aix32/gcc-related/string.h<<'EOF-EOF-EOF'
- extern "C" {
- #include <sys/types.h>
- #include <standards.h>
- extern char *strerror(int errnum);
- extern char *strchr(const char *s, int c);
- extern int strncmp(const char *s1,const char *s2,size_t n);
- extern char *strdup(char *s);
- }
- EOF-EOF-EOF
- NewFile port/aix32/gcc-related/termios.h<<'EOF-EOF-EOF'
- extern "C" {
- #include_next <termios.h>
- }
- EOF-EOF-EOF
- NewFile port/aix32/gcc-related/time.h<<'EOF-EOF-EOF'
- extern "C" {
- #define localtime Fx_localtime
- #include_next <time.h>
- #undef localtime
- }
- EOF-EOF-EOF
- NewFile port/aix32/gcc-related/unistd.h<<'EOF-EOF-EOF'
- #ifndef _H_UNISTD
-
- extern "C" {
- #include <sys/stat.h>
- #include <fcntl.h>
- #include <signal.h>
-
- /* avoid clash with (identical, but differing in whitespace) definitions in stdio.h (some macro-preprocessors are whitespace sensitive) */
- #ifdef SEEK_SET
- #undef SEEK_SET
- #endif
- #ifdef SEEK_CUR
- #undef SEEK_CUR
- #endif
- #ifdef SEEK_END
- #undef SEEK_END
- #endif
-
- // Override these definitions in /usr/include/unistd.h
- #define chdir Fx_chdir
- #define execve Fx_execve
- #define execvp Fx_execvp
- #define getcwd Fx_getcwd
- #define read Fx_read
- #define write Fx_write
-
- // Avoid clashes with C++ operator new
- #define new Fx_new
-
- #include_next <unistd.h>
-
- #undef chdir
- #undef execve
- #undef execvp
- #undef getcwd
- #undef read
- #undef write
-
- #undef new
- #ifdef NULL
- #undef NULL
- #define NULL 0
- #endif
-
- int chdir(const char*);
- int execve(const char*, const char*[], const char*[]);
- int execvp(const char*, const char*[]);
- char *getcwd(const char *, int);
- int read(int, void*, unsigned);
- int write(int, const void*, unsigned);
-
- // Add these functions - somehow they are missing from /usr/include/unistd.h
- int acct(const char*);
- int brk(char*);
- int chroot(const char*);
- int closepl();
- char *getwd(char *);
- int ioctl(int, int ...);
- int lockf(int, int, off_t);
- int mknod(const char*, int, int);
- int mount(const char*, const char*, int);
- int nice(int);
- int openpl();
- int plock(int);
- void profil(const char*, int, int, int);
- int ptrace(int, int, int, int);
- int rmount(const char *,const char *, const char *, int);
- char *sbrk(int);
- int setpgrp();
- int stime(const long*);
- void sync();
- void sys3b(int, int ...);
- int umount(const char*);
- int vfork(void);
-
- int system(const char*);
- int kill(pid_t, int);
-
- int accessx(const char *, int, int);
- int faccessx(int, int, int);
-
- }
- #endif
- EOF-EOF-EOF
- NewDir port/aix32/gcc-related/sys
- NewFile port/aix32/gcc-related/sys/fcntl.h<<'EOF-EOF-EOF'
- extern "C" {
- #define open Fx_open
- #include_next <fcntl.h>
- #undef open
- #undef creat
- int open(const char *, int, mode_t = 0666);
- }
- EOF-EOF-EOF
- NewFile port/aix32/gcc-related/sys/select.h<<'EOF-EOF-EOF'
- extern "C" {
- #include_next <sys/select.h>
- }
- EOF-EOF-EOF
- NewFile port/aix32/gcc-related/sys/stat.h<<'EOF-EOF-EOF'
- extern "C" {
- #define fchmod Fx_fchmod
- #define fchown Fx_fchown
- #include_next <sys/stat.h>
- #undef fchmod
- #undef fchown
- int fstat(int fildes, struct stat *);
- }
- EOF-EOF-EOF
- NewFile port/aix32/gcc-related/sys/time.h<<'EOF-EOF-EOF'
- extern "C" {
- #include_next <sys/time.h>
- int gettimeofday(struct timeval*, struct timezone*);
- int settimeofday(struct timeval*, struct timezone*);
- int usleep (unsigned int);
- struct itimerval;
- int setitimer (int, itimerval*, itimerval*);
- int getitimer (int, itimerval*);
- }
- EOF-EOF-EOF
- NewFile port/aix32/gcc-related/sys/wait.h<<'EOF-EOF-EOF'
- extern "C" {
- #define wait3 Fx_wait3
- #include_next <sys/wait.h>
- #undef wait3
- }
- EOF-EOF-EOF
- Patch port/bsdi/defs<<'EOF-EOF-EOF'
- 1c1
- < # $Header: /usr/people/sam/fax/port/bsdi/RCS/defs,v 1.24 93/08/13 15:16:09 sam Exp $
- ---
- > # $Header: /usr/people/sam/fax/port/bsdi/RCS/defs,v 1.26 93/08/17 18:20:46 sam Exp $
- 117c117
- < MACHDEPLIBS=-lg++ -liberty
- ---
- > MACHDEPLIBS=-lg++
- 226c226
- < GCDEFS=
- ---
- > GCDEFS=-DSIGCLD=SIGCHLD
- 243c243
- < GC++DEFS=-DfxSIGHANDLER=sig_t '-DfxSIGVECHANDLER=(void(*)())'
- ---
- > GC++DEFS=-DfxSIGHANDLER=sig_t '-DfxSIGVECHANDLER=(void(*)())' -DSIGCLD=SIGCHLD
- EOF-EOF-EOF
- Patch port/linux/defs<<'EOF-EOF-EOF'
- 1c1
- < # $Header: /usr/people/sam/fax/port/linux/RCS/defs,v 1.3 93/08/13 15:16:17 sam Exp $
- ---
- > # $Header: /usr/people/sam/fax/port/linux/RCS/defs,v 1.4 93/08/17 11:30:05 sam Exp $
- 123c123
- < MACHDEPLIBS=-lg++ #-liberty
- ---
- > MACHDEPLIBS=-lg++
- EOF-EOF-EOF
- Patch port/sco/defs<<'EOF-EOF-EOF'
- 1c1
- < # $Header: /usr/people/sam/fax/port/sco/RCS/defs,v 1.7 93/08/13 15:16:20 sam Exp $
- ---
- > # $Header: /usr/people/sam/fax/port/sco/RCS/defs,v 1.8 93/08/17 11:30:10 sam Exp $
- 116c116
- < MACHDEPLIBS=-lg++ -liberty -lsocket -lc -lm -lintl -lx
- ---
- > MACHDEPLIBS=-lg++ -lsocket -lc -lm -lintl -lx
- EOF-EOF-EOF
- Patch port/sgi/defs.gcc<<'EOF-EOF-EOF'
- 1c1
- < # $Header: /usr/people/sam/fax/port/sgi/RCS/defs.gcc,v 1.11 93/08/13 15:16:22 sam Exp $
- ---
- > # $Header: /usr/people/sam/fax/port/sgi/RCS/defs.gcc,v 1.12 93/08/17 11:30:22 sam Exp $
- 117c117
- < MACHDEPLIBS=-lmalloc -lsun -lg++ -liberty
- ---
- > MACHDEPLIBS=-lmalloc -lsun -lg++
- EOF-EOF-EOF
- Patch port/solaris2/defs<<'EOF-EOF-EOF'
- 1c1
- < # $Header: /usr/people/sam/fax/port/solaris2/RCS/defs,v 1.9 93/08/13 15:16:23 sam Exp $
- ---
- > # $Header: /usr/people/sam/fax/port/solaris2/RCS/defs,v 1.10 93/08/17 11:30:11 sam Exp $
- 119c119
- < MACHDEPLIBS=-lg++ -liberty -lsocket -lnsl -lc -lm -L/usr/ucblib -lucb -lelf
- ---
- > MACHDEPLIBS=-lg++ -lsocket -lnsl -lc -lm -L/usr/ucblib -lucb -lelf
- EOF-EOF-EOF
- Patch port/sun/defs<<'EOF-EOF-EOF'
- 1c1
- < # $Header: /usr/people/sam/fax/port/sun/RCS/defs,v 1.30 93/08/13 15:16:24 sam Exp $
- ---
- > # $Header: /usr/people/sam/fax/port/sun/RCS/defs,v 1.31 93/08/17 11:30:14 sam Exp $
- 111c111
- < MACHDEPLIBS=-lg++ -liberty
- ---
- > MACHDEPLIBS=-lg++
- EOF-EOF-EOF
- Patch port/svr4/defs<<'EOF-EOF-EOF'
- 1c1
- < # $Header: /usr/people/sam/fax/port/svr4/RCS/defs,v 1.14 93/08/13 15:16:25 sam Exp $
- ---
- > # $Header: /usr/people/sam/fax/port/svr4/RCS/defs,v 1.15 93/08/17 11:30:16 sam Exp $
- 118c118
- < MACHDEPLIBS=-lg++ -liberty -lsocket -lnsl -lc -lm -L/usr/ucblib -lucb -lelf
- ---
- > MACHDEPLIBS=-lg++ -lsocket -lnsl -lc -lm -L/usr/ucblib -lucb -lelf
- EOF-EOF-EOF
- Patch recvfax/jobs.c<<'EOF-EOF-EOF'
- 1c1
- < /* $Header: /usr/people/sam/fax/recvfax/RCS/jobs.c,v 1.21 93/08/14 19:51:31 sam Exp $
- ---
- > /* $Header: /usr/people/sam/fax/recvfax/RCS/jobs.c,v 1.22 93/08/27 14:05:24 sam Exp $
- 154a155,182
- > static int
- > checkUser(const char* requestor, struct passwd* pwd)
- > {
- > char buf[1024];
- > char* cp;
- >
- > buf[0] = '\0';
- > if (pwd->pw_gecos) {
- > if (pwd->pw_gecos[0] == '&') {
- > strcpy(buf, pwd->pw_name);
- > strcat(buf, pwd->pw_gecos+1);
- > if (islower(buf[0]))
- > buf[0] = toupper(buf[0]);
- > } else
- > strcpy(buf, pwd->pw_gecos);
- > if ((cp = strchr(buf,',')) != 0)
- > *cp = '\0';
- > } else
- > strcpy(buf, pwd->pw_name);
- > if (debug) {
- > if (*buf)
- > syslog(LOG_DEBUG, "%s user: \"%s\"", pwd->pw_name, buf);
- > else
- > syslog(LOG_DEBUG, "name of %s user unknown", pwd->pw_name);
- > }
- > return (strcmp(requestor, buf) == 0);
- > }
- >
- 159,161d186
- < struct passwd* pwd = NULL;
- < char buf[1024];
- < char* cp;
- 184c209
- < return; /* nothing to do */
- ---
- > return;
- 186,194c211,220
- < if (strcmp(requestor, (*job)->sender) == 0) {
- < /* alter job parameters */
- < if (debug)
- < syslog(LOG_DEBUG, "%s request by owner for %s", op, tag);
- < (*f)(*job, tag, arg);
- < if ((*job)->flags & JOB_INVALID)
- < *job = (*job)->next;
- < return; /* nothing to do */
- < }
- ---
- > /*
- > * Validate requestor is permitted to do op to the
- > * requested job. We permit the person that submitted
- > * the job, the fax user, and root. Using the GECOS
- > * field in doing the comparison is a crock, but not
- > * something to change now--leave it for a protocol
- > * redesign.
- > */
- > if (strcmp(requestor, (*job)->sender) != 0) { /* not the sender */
- > struct passwd* pwd = getpwuid(getuid());
- 196,200c222,243
- < buf[0] = '\0';
- < pwd = getpwuid(getuid());
- < if (!pwd) {
- < syslog(LOG_ERR, "getpwuid failed for uid %d: %m", getuid());
- < pwd = getpwuid(geteuid());
- ---
- > if (!pwd) {
- > syslog(LOG_ERR, "getpwuid failed for uid %d: %m", getuid());
- > pwd = getpwuid(geteuid());
- > }
- > if (!pwd) {
- > syslog(LOG_ERR, "getpwuid failed for effective uid %d: %m",
- > geteuid());
- > sendClient("sOwner", "%s", tag);
- > return;
- > }
- > if (!checkUser(requestor, pwd)) { /* not fax user */
- > pwd = getpwnam("root");
- > if (!pwd) {
- > syslog(LOG_ERR, "getpwnam failed for \"root\": %m");
- > sendClient("sOwner", "%s", tag);
- > return;
- > }
- > if (!checkUser(requestor, pwd)) { /* not root user */
- > sendClient("jobOwner", "%s", tag);
- > return;
- > }
- > }
- 202,230c245,249
- < if (!pwd) {
- < syslog(LOG_ERR, "getpwuid failed for effective uid %d: %m", geteuid());
- < sendClient("sOwner", "%s", tag);
- < } else {
- < if (pwd->pw_gecos) {
- < if (pwd->pw_gecos[0] == '&') {
- < strcpy(buf, pwd->pw_name);
- < strcat(buf, pwd->pw_gecos+1);
- < if (islower(buf[0]))
- < buf[0] = toupper(buf[0]);
- < } else
- < strcpy(buf, pwd->pw_gecos);
- < if ((cp = strchr(buf,',')) != 0)
- < *cp = '\0';
- < } else
- < strcpy(buf, pwd->pw_name);
- < }
- < if (debug) {
- < if (*buf)
- < syslog(LOG_DEBUG, "fax user: \"%s\"", buf);
- < else
- < syslog(LOG_DEBUG, "name of fax user unknown");
- < }
- < if (strcmp(requestor, buf) == 0) {
- < (*f)(*job, tag, arg);
- < if ((*job)->flags & JOB_INVALID)
- < *job = (*job)->next;
- < } else
- < sendClient("jobOwner", "%s", tag);
- ---
- > if (debug)
- > syslog(LOG_DEBUG, "%s request by %s for %s", op, requestor, tag);
- > (*f)(*job, tag, arg);
- > if ((*job)->flags & JOB_INVALID)
- > *job = (*job)->next;
- EOF-EOF-EOF
- Patch sendfax/sendfax.c++<<'EOF-EOF-EOF'
- 1c1
- < /* $Header: /usr/people/sam/fax/sendfax/RCS/sendfax.c++,v 1.56 93/08/15 11:24:09 sam Exp $
- ---
- > /* $Header: /usr/people/sam/fax/sendfax/RCS/sendfax.c++,v 1.57 93/08/27 14:01:48 sam Exp $
- 258c258
- < int fd = mkstemp(tmpl);
- ---
- > int fd = mkstemp((char*) tmpl);
- EOF-EOF-EOF
- Patch util/FaxClient.c++<<'EOF-EOF-EOF'
- 1c1
- < /* $Header: /usr/people/sam/fax/util/RCS/FaxClient.c++,v 1.30 93/08/16 08:19:05 sam Exp $
- ---
- > /* $Header: /usr/people/sam/fax/util/RCS/FaxClient.c++,v 1.31 93/08/27 14:05:51 sam Exp $
- 165c165
- < fxFatal("%s: Unknown host.", (char*) host);
- ---
- > fxFatal("%s: Unknown host", (char*) host);
- EOF-EOF-EOF
- Patch util/SendFaxClient.c++<<'EOF-EOF-EOF'
- 1c1
- < /* $Header: /usr/people/sam/fax/util/RCS/SendFaxClient.c++,v 1.13 93/08/15 11:22:38 sam Exp $
- ---
- > /* $Header: /usr/people/sam/fax/util/RCS/SendFaxClient.c++,v 1.14 93/08/27 14:01:49 sam Exp $
- 519c519
- < int fd = mkstemp(templ);
- ---
- > int fd = mkstemp((char*) templ);
- EOF-EOF-EOF
- Patch util/textfmt.c++<<'EOF-EOF-EOF'
- 1c1
- < /* $Header: /usr/people/sam/fax/util/RCS/textfmt.c++,v 1.20 93/08/15 11:22:41 sam Exp $
- ---
- > /* $Header: /usr/people/sam/fax/util/RCS/textfmt.c++,v 1.22 93/08/20 17:51:40 sam Exp $
- 89a90
- > fxBool bop; // at beginning of a page
- 559a561
- > bop = TRUE;
- 600c602
- < beginCol(), boc = FALSE;
- ---
- > beginCol(), boc = FALSE, bop = FALSE;
- 722,723c724,727
- < column = numcol; // force page end action
- < endTextCol();
- ---
- > if (!bop) {
- > column = numcol; // force page end action
- > endTextCol();
- > }
- 743c747
- < closepath stroke\
- ---
- > closepath stroke \
- EOF-EOF-EOF
-